import Router from './director.js';
import Reg from '../pages/reg.js';
import Login from '../pages/login.js';
import Manage from '../pages/manage.js';
import Student from '../pages/student.js';
// import Cls from '../pages/class.js';
let {$} = layui;
let routes = {
    '/reg':() => new Reg(),
    '/login':() => new Login(),
    '/manage':{
        '/student': () => new Student(),
        // '/class': () => new Cls(),
        on:(next) => new Manage(next)
    }
};

// 默认访问注册模块
location.hash = location.hash || "#reg";
let router = Router(routes).configure({
    recurse: 'forward',
    async:true,
    strict:false
}); // 实例化路由
router.init(); // 初始化路由
